#include "transfer/SpaceRemover.h"
#include "transfer/UpperTransfer.h"
#include "gtest/gtest.h"
using namespace std;

TEST(SampleTest, true_should_be_true)
{
    ASSERT_TRUE(true);
}

TEST(SampleTest, when_input_a_string_with_space_then_output_a_string_without_space)
{
    SpaceRemover *sr = new SpaceRemover();
    ASSERT_TRUE(sr != nullptr);
    string src = "  tes t  ";
    string result;
    sr->process(src, result);
    ASSERT_STREQ("test", result.c_str());
    delete sr;
}

TEST(SampleTest, should_transfer_a_string_to_upper_case)
{
    UpperTransfer *sr = new UpperTransfer();
    ASSERT_TRUE(sr != nullptr);
    string src = "  tes t  ";
    string result;
    sr->process(src, result);
    ASSERT_STREQ("  TES T  ", result.c_str());
    delete sr;
}